﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using NewDDSys.Entity;
using NewDDSys.IBLL;
using NewDDSys.IDAL;
using NewDDSys.Factory;
using NewDDSys.Utility;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Web_KCDT : System.Web.UI.Page
{
    private string ku = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        ku = Session["用户信息.部门"].ToString();
        if(ku == "化产库")
            Response.Redirect("HKCDT.aspx");
    }
    protected void ddlPinzhong_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (ddlPinzhong.SelectedIndex != 0)
        {
            switch (ddlPinzhong.SelectedValue.ToString())
            {
                case "线材":
                    {
                        if(ku == "一高线" || ku == "二高线" || ku == "大棒线" || ku == "四轧库")
                            Response.Redirect("XKCDT.aspx");
                        else
                            Response.Write(" <script   language=javascript> window.alert( ' 品种不正确！ ');</script> ");
                        

                    }; break;
                case "棒材":
                    {
                        if (ku == "一高线" || ku == "二高线" || ku == "大棒线" || ku == "四轧库")
                            Response.Redirect("BKCDT.aspx");
                        else
                            Response.Write(" <script   language=javascript> window.alert( ' 品种不正确！ ');</script> ");
                        

                    }; break;
                case "酸洗热轧":
                    {
                        if (ku == "不锈钢热轧库" || ku == "碳钢热轧库" || ku == "酸洗库")
                            Response.Redirect("RKCDT.aspx");
                        else
                            Response.Write(" <script   language=javascript> window.alert( ' 品种不正确！ ');</script> ");
                    }; break;
                case "冷轧":
                    {
                        if (ku == "不锈钢冷轧库" || ku == "碳钢冷轧库")
                            Response.Redirect("LKCDT.aspx");
                        else
                            Response.Write(" <script   language=javascript> window.alert( ' 品种不正确！ ');</script> ");
                    }; break;
                case "中板":
                    {
                        if (ku == "板材库")
                            Response.Redirect("ZKCDT.aspx");
                        else
                            Response.Write(" <script   language=javascript> window.alert( ' 品种不正确！ ');</script> ");
                    }; break;
                default:
                    break;
            }
        }
    }
}
